<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Kinetis Bootloader Host: elftosb::EncoreBootImage::LoadCommand Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Kinetis Bootloader Host
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
   <div id="projectbrief">Host Tools for Kinetis devices</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Introduction</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classelftosb_1_1_encore_boot_image_1_1_load_command.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classelftosb_1_1_encore_boot_image_1_1_load_command-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">elftosb::EncoreBootImage::LoadCommand Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Load data bootloader command.  
 <a href="classelftosb_1_1_encore_boot_image_1_1_load_command.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_encore_boot_image_8h_source.html">EncoreBootImage.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for elftosb::EncoreBootImage::LoadCommand:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="classelftosb_1_1_encore_boot_image_1_1_load_command__inherit__graph.svg" width="182" height="231"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-1-trigger" src="closed.png" alt="+"/> Collaboration diagram for elftosb::EncoreBootImage::LoadCommand:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="classelftosb_1_1_encore_boot_image_1_1_load_command__coll__graph.svg" width="382" height="247"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a1841804636bd54dadc801149a93586ac"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_encore_boot_image_1_1_load_command.html#a1841804636bd54dadc801149a93586ac">LoadCommand</a> ()</td></tr>
<tr class="memdesc:a1841804636bd54dadc801149a93586ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="#a1841804636bd54dadc801149a93586ac">More...</a><br /></td></tr>
<tr class="separator:a1841804636bd54dadc801149a93586ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e4a95812f78440c98455c66e3eb4d71"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8e4a95812f78440c98455c66e3eb4d71"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_encore_boot_image_1_1_load_command.html#a8e4a95812f78440c98455c66e3eb4d71">LoadCommand</a> (uint32_t address, const uint8_t *data, uint32_t length)</td></tr>
<tr class="memdesc:a8e4a95812f78440c98455c66e3eb4d71"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:a8e4a95812f78440c98455c66e3eb4d71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a203f5100b5104459a593b5146821af95"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_encore_boot_image_1_1_load_command.html#a203f5100b5104459a593b5146821af95">initFromData</a> (const cipher_block_t *blocks, unsigned count, unsigned *consumed)</td></tr>
<tr class="memdesc:a203f5100b5104459a593b5146821af95"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read the command contents from raw data.  <a href="#a203f5100b5104459a593b5146821af95">More...</a><br /></td></tr>
<tr class="separator:a203f5100b5104459a593b5146821af95"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a43a6adfb94e32b733b0679c1d2ea246b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a43a6adfb94e32b733b0679c1d2ea246b"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_encore_boot_image_1_1_load_command.html#a43a6adfb94e32b733b0679c1d2ea246b">debugPrint</a> () const </td></tr>
<tr class="memdesc:a43a6adfb94e32b733b0679c1d2ea246b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Print out a string representation of the object. <br /></td></tr>
<tr class="separator:a43a6adfb94e32b733b0679c1d2ea246b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Header</div></td></tr>
<tr class="memitem:a2682d6c49fcb2ebd8dfbb1198d67f117"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2682d6c49fcb2ebd8dfbb1198d67f117"></a>
virtual uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_encore_boot_image_1_1_load_command.html#a2682d6c49fcb2ebd8dfbb1198d67f117">getTag</a> () const </td></tr>
<tr class="memdesc:a2682d6c49fcb2ebd8dfbb1198d67f117"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the tag value for this command. <br /></td></tr>
<tr class="separator:a2682d6c49fcb2ebd8dfbb1198d67f117"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9a0c5e3c1a3643c6b5d16d51b507ab5"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_encore_boot_image_1_1_load_command.html#ac9a0c5e3c1a3643c6b5d16d51b507ab5">fillCommandHeader</a> (<a class="el" href="classelftosb_1_1_encore_boot_image.html#structelftosb_1_1_encore_boot_image_1_1boot__command__t">boot_command_t</a> &amp;header)</td></tr>
<tr class="memdesc:ac9a0c5e3c1a3643c6b5d16d51b507ab5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs the header for this boot command.  <a href="#ac9a0c5e3c1a3643c6b5d16d51b507ab5">More...</a><br /></td></tr>
<tr class="separator:ac9a0c5e3c1a3643c6b5d16d51b507ab5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af455d51ffe43e1427d48e596e02cbbc0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af455d51ffe43e1427d48e596e02cbbc0"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_encore_boot_image_1_1_load_command.html#af455d51ffe43e1427d48e596e02cbbc0">setDCD</a> (bool isDCD)</td></tr>
<tr class="memdesc:af455d51ffe43e1427d48e596e02cbbc0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the load-dcd flag. <br /></td></tr>
<tr class="separator:af455d51ffe43e1427d48e596e02cbbc0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Address</div></td></tr>
<tr class="memitem:aba1ef897dacc137001db4fd5aee421d1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aba1ef897dacc137001db4fd5aee421d1"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setLoadAddress</b> (uint32_t address)</td></tr>
<tr class="separator:aba1ef897dacc137001db4fd5aee421d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05fb15fb286f4cfe82e58361fb37612e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a05fb15fb286f4cfe82e58361fb37612e"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>getLoadAddress</b> () const </td></tr>
<tr class="separator:a05fb15fb286f4cfe82e58361fb37612e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Load data</div></td></tr>
<tr class="memitem:aacf46c57a4f932a02b4ce0622ffee958"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_encore_boot_image_1_1_load_command.html#aacf46c57a4f932a02b4ce0622ffee958">setData</a> (const uint8_t *data, uint32_t length)</td></tr>
<tr class="memdesc:aacf46c57a4f932a02b4ce0622ffee958"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the data for the command to load.  <a href="#aacf46c57a4f932a02b4ce0622ffee958">More...</a><br /></td></tr>
<tr class="separator:aacf46c57a4f932a02b4ce0622ffee958"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a626a6ae07f662f7522d5bd385b43babd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a626a6ae07f662f7522d5bd385b43babd"></a>
uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><b>getData</b> ()</td></tr>
<tr class="separator:a626a6ae07f662f7522d5bd385b43babd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a746de25b6490d43c2cc3aa343defb80c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a746de25b6490d43c2cc3aa343defb80c"></a>
const uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><b>getData</b> () const </td></tr>
<tr class="separator:a746de25b6490d43c2cc3aa343defb80c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3397818c8c1541851d6a4a5f830e93cc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3397818c8c1541851d6a4a5f830e93cc"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>getLength</b> () const </td></tr>
<tr class="separator:a3397818c8c1541851d6a4a5f830e93cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Data blocks</div></td></tr>
<tr class="memitem:acb6824278d6bf8ca9bae7c6f80bc5a8c"><td class="memItemLeft" align="right" valign="top">virtual unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_encore_boot_image_1_1_load_command.html#acb6824278d6bf8ca9bae7c6f80bc5a8c">getDataBlockCount</a> () const </td></tr>
<tr class="memdesc:acb6824278d6bf8ca9bae7c6f80bc5a8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of data cipher blocks that follow this command.  <a href="#acb6824278d6bf8ca9bae7c6f80bc5a8c">More...</a><br /></td></tr>
<tr class="separator:acb6824278d6bf8ca9bae7c6f80bc5a8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5f8de3074ec88c92887a26c175ddfc6f"><td class="memItemLeft" align="right" valign="top">virtual unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_encore_boot_image_1_1_load_command.html#a5f8de3074ec88c92887a26c175ddfc6f">getDataBlocks</a> (unsigned offset, unsigned maxCount, cipher_block_t *data)</td></tr>
<tr class="memdesc:a5f8de3074ec88c92887a26c175ddfc6f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the contents of up to <em>maxCount</em> data blocks.  <a href="#a5f8de3074ec88c92887a26c175ddfc6f">More...</a><br /></td></tr>
<tr class="separator:a5f8de3074ec88c92887a26c175ddfc6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classelftosb_1_1_encore_boot_image_1_1_boot_command"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classelftosb_1_1_encore_boot_image_1_1_boot_command')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classelftosb_1_1_encore_boot_image_1_1_boot_command.html">elftosb::EncoreBootImage::BootCommand</a></td></tr>
<tr class="memitem:ac20b874eb88952931204d1ea0f98267f inherit pub_methods_classelftosb_1_1_encore_boot_image_1_1_boot_command"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac20b874eb88952931204d1ea0f98267f"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_encore_boot_image_1_1_boot_command.html#ac20b874eb88952931204d1ea0f98267f">BootCommand</a> ()</td></tr>
<tr class="memdesc:ac20b874eb88952931204d1ea0f98267f inherit pub_methods_classelftosb_1_1_encore_boot_image_1_1_boot_command"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor. <br /></td></tr>
<tr class="separator:ac20b874eb88952931204d1ea0f98267f inherit pub_methods_classelftosb_1_1_encore_boot_image_1_1_boot_command"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7d5a2f3eb06e9e5506be3d10b66e2c6 inherit pub_methods_classelftosb_1_1_encore_boot_image_1_1_boot_command"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae7d5a2f3eb06e9e5506be3d10b66e2c6"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_encore_boot_image_1_1_boot_command.html#ae7d5a2f3eb06e9e5506be3d10b66e2c6">~BootCommand</a> ()</td></tr>
<tr class="memdesc:ae7d5a2f3eb06e9e5506be3d10b66e2c6 inherit pub_methods_classelftosb_1_1_encore_boot_image_1_1_boot_command"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:ae7d5a2f3eb06e9e5506be3d10b66e2c6 inherit pub_methods_classelftosb_1_1_encore_boot_image_1_1_boot_command"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a828dda19e5c8e1a0628a39bf90b39fda inherit pub_methods_classelftosb_1_1_encore_boot_image_1_1_boot_command"><td class="memItemLeft" align="right" valign="top">virtual uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_encore_boot_image_1_1_boot_command.html#a828dda19e5c8e1a0628a39bf90b39fda">calculateChecksum</a> (const <a class="el" href="classelftosb_1_1_encore_boot_image.html#structelftosb_1_1_encore_boot_image_1_1boot__command__t">boot_command_t</a> &amp;header)</td></tr>
<tr class="memdesc:a828dda19e5c8e1a0628a39bf90b39fda inherit pub_methods_classelftosb_1_1_encore_boot_image_1_1_boot_command"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates the checksum for the given command header.  <a href="#a828dda19e5c8e1a0628a39bf90b39fda">More...</a><br /></td></tr>
<tr class="separator:a828dda19e5c8e1a0628a39bf90b39fda inherit pub_methods_classelftosb_1_1_encore_boot_image_1_1_boot_command"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac8e41c77785db7a486b8102360bea785 inherit pub_methods_classelftosb_1_1_encore_boot_image_1_1_boot_command"><td class="memItemLeft" align="right" valign="top">virtual unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_encore_boot_image_1_1_boot_command.html#ac8e41c77785db7a486b8102360bea785">getBlockCount</a> () const </td></tr>
<tr class="memdesc:ac8e41c77785db7a486b8102360bea785 inherit pub_methods_classelftosb_1_1_encore_boot_image_1_1_boot_command"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the total number of cipher blocks.  <a href="#ac8e41c77785db7a486b8102360bea785">More...</a><br /></td></tr>
<tr class="separator:ac8e41c77785db7a486b8102360bea785 inherit pub_methods_classelftosb_1_1_encore_boot_image_1_1_boot_command"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd1b5489a1a8899b707a9b366d0971c8 inherit pub_methods_classelftosb_1_1_encore_boot_image_1_1_boot_command"><td class="memItemLeft" align="right" valign="top">virtual unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_encore_boot_image_1_1_boot_command.html#acd1b5489a1a8899b707a9b366d0971c8">getBlocks</a> (unsigned offset, unsigned maxCount, cipher_block_t *data)</td></tr>
<tr class="memdesc:acd1b5489a1a8899b707a9b366d0971c8 inherit pub_methods_classelftosb_1_1_encore_boot_image_1_1_boot_command"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the contents of up to <em>maxCount</em> cipher blocks.  <a href="#acd1b5489a1a8899b707a9b366d0971c8">More...</a><br /></td></tr>
<tr class="separator:acd1b5489a1a8899b707a9b366d0971c8 inherit pub_methods_classelftosb_1_1_encore_boot_image_1_1_boot_command"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Cipher blocks</div></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:aea1eaeacc68bfd097e6cb674920a194b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_encore_boot_image_1_1_load_command.html#aea1eaeacc68bfd097e6cb674920a194b">fillPadding</a> ()</td></tr>
<tr class="separator:aea1eaeacc68bfd097e6cb674920a194b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92f9fd7033d99f34803ce742c0eeab2a"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_encore_boot_image_1_1_load_command.html#a92f9fd7033d99f34803ce742c0eeab2a">calculateCRC</a> () const </td></tr>
<tr class="separator:a92f9fd7033d99f34803ce742c0eeab2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_methods_classelftosb_1_1_encore_boot_image_1_1_boot_command"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classelftosb_1_1_encore_boot_image_1_1_boot_command')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="classelftosb_1_1_encore_boot_image_1_1_boot_command.html">elftosb::EncoreBootImage::BootCommand</a></td></tr>
<tr class="memitem:a5ed39355be6653d7665cb91ef24361e5 inherit pro_methods_classelftosb_1_1_encore_boot_image_1_1_boot_command"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_encore_boot_image_1_1_boot_command.html#a5ed39355be6653d7665cb91ef24361e5">validateHeader</a> (const <a class="el" href="classelftosb_1_1_encore_boot_image.html#structelftosb_1_1_encore_boot_image_1_1boot__command__t">boot_command_t</a> *modelHeader, const <a class="el" href="classelftosb_1_1_encore_boot_image.html#structelftosb_1_1_encore_boot_image_1_1boot__command__t">boot_command_t</a> *testHeader, unsigned whichFields)</td></tr>
<tr class="separator:a5ed39355be6653d7665cb91ef24361e5 inherit pro_methods_classelftosb_1_1_encore_boot_image_1_1_boot_command"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:afd6f7add50215ae533b5e91b2684237d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afd6f7add50215ae533b5e91b2684237d"></a>
<a class="el" href="group__smart__pointer.html#classsmart__array__ptr">smart_array_ptr</a>&lt; uint8_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_encore_boot_image_1_1_load_command.html#afd6f7add50215ae533b5e91b2684237d">m_data</a></td></tr>
<tr class="memdesc:afd6f7add50215ae533b5e91b2684237d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to data to load. <br /></td></tr>
<tr class="separator:afd6f7add50215ae533b5e91b2684237d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a43e6cc79a5e12d17ba9cd515633e73f3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a43e6cc79a5e12d17ba9cd515633e73f3"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_encore_boot_image_1_1_load_command.html#a43e6cc79a5e12d17ba9cd515633e73f3">m_padding</a> [15]</td></tr>
<tr class="memdesc:a43e6cc79a5e12d17ba9cd515633e73f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Up to 15 pad bytes may be required. <br /></td></tr>
<tr class="separator:a43e6cc79a5e12d17ba9cd515633e73f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad459f4aa4005ddf8fc20475f48792bac"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad459f4aa4005ddf8fc20475f48792bac"></a>
unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_encore_boot_image_1_1_load_command.html#ad459f4aa4005ddf8fc20475f48792bac">m_padCount</a></td></tr>
<tr class="memdesc:ad459f4aa4005ddf8fc20475f48792bac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of pad bytes. <br /></td></tr>
<tr class="separator:ad459f4aa4005ddf8fc20475f48792bac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a206b6b3adda12c1ed601d347f3e01fda"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a206b6b3adda12c1ed601d347f3e01fda"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_encore_boot_image_1_1_load_command.html#a206b6b3adda12c1ed601d347f3e01fda">m_length</a></td></tr>
<tr class="memdesc:a206b6b3adda12c1ed601d347f3e01fda"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of bytes to load. <br /></td></tr>
<tr class="separator:a206b6b3adda12c1ed601d347f3e01fda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a430d2e2d76b57ea6ae8e2e6807d05702"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a430d2e2d76b57ea6ae8e2e6807d05702"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_encore_boot_image_1_1_load_command.html#a430d2e2d76b57ea6ae8e2e6807d05702">m_address</a></td></tr>
<tr class="memdesc:a430d2e2d76b57ea6ae8e2e6807d05702"><td class="mdescLeft">&#160;</td><td class="mdescRight">Address to which data will be loaded. <br /></td></tr>
<tr class="separator:a430d2e2d76b57ea6ae8e2e6807d05702"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31a6ed49c23e5399d7f3693e8e741329"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a31a6ed49c23e5399d7f3693e8e741329"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_encore_boot_image_1_1_load_command.html#a31a6ed49c23e5399d7f3693e8e741329">m_loadDCD</a></td></tr>
<tr class="memdesc:a31a6ed49c23e5399d7f3693e8e741329"><td class="mdescLeft">&#160;</td><td class="mdescRight">Whether to execute the DCD after loading. <br /></td></tr>
<tr class="separator:a31a6ed49c23e5399d7f3693e8e741329"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_static_methods_classelftosb_1_1_encore_boot_image_1_1_boot_command"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classelftosb_1_1_encore_boot_image_1_1_boot_command')"><img src="closed.png" alt="-"/>&#160;Static Public Member Functions inherited from <a class="el" href="classelftosb_1_1_encore_boot_image_1_1_boot_command.html">elftosb::EncoreBootImage::BootCommand</a></td></tr>
<tr class="memitem:a5ffcb1578efd1531c594b64faf2163f1 inherit pub_static_methods_classelftosb_1_1_encore_boot_image_1_1_boot_command"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classelftosb_1_1_encore_boot_image_1_1_boot_command.html">BootCommand</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classelftosb_1_1_encore_boot_image_1_1_boot_command.html#a5ffcb1578efd1531c594b64faf2163f1">createFromData</a> (const cipher_block_t *blocks, unsigned count, unsigned *consumed)</td></tr>
<tr class="memdesc:a5ffcb1578efd1531c594b64faf2163f1 inherit pub_static_methods_classelftosb_1_1_encore_boot_image_1_1_boot_command"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates the correct subclass of <a class="el" href="classelftosb_1_1_encore_boot_image_1_1_boot_command.html" title="Abstract base class for all bootloader commands. ">BootCommand</a> for the given raw data.  <a href="#a5ffcb1578efd1531c594b64faf2163f1">More...</a><br /></td></tr>
<tr class="separator:a5ffcb1578efd1531c594b64faf2163f1 inherit pub_static_methods_classelftosb_1_1_encore_boot_image_1_1_boot_command"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_types_classelftosb_1_1_encore_boot_image_1_1_boot_command"><td colspan="2" onclick="javascript:toggleInherit('pro_types_classelftosb_1_1_encore_boot_image_1_1_boot_command')"><img src="closed.png" alt="-"/>&#160;Protected Types inherited from <a class="el" href="classelftosb_1_1_encore_boot_image_1_1_boot_command.html">elftosb::EncoreBootImage::BootCommand</a></td></tr>
<tr class="memitem:a860e4a7f504f14254a28002418d78e2c inherit pro_types_classelftosb_1_1_encore_boot_image_1_1_boot_command"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a860e4a7f504f14254a28002418d78e2c"></a>enum &#160;</td><td class="memItemRight" valign="bottom">{ <br />
&#160;&#160;<b>CMD_TAG_FIELD</b> = 1, 
<br />
&#160;&#160;<b>CMD_FLAGS_FIELD</b> = 2, 
<br />
&#160;&#160;<b>CMD_ADDRESS_FIELD</b> = 4, 
<br />
&#160;&#160;<b>CMD_COUNT_FIELD</b> = 8, 
<br />
&#160;&#160;<b>CMD_DATA_FIELD</b> = 16
<br />
 }<tr class="memdesc:a860e4a7f504f14254a28002418d78e2c"><td class="mdescLeft">&#160;</td><td class="mdescRight">The flag bit values for the <em>whichFields</em> parameter of <a class="el" href="classelftosb_1_1_encore_boot_image_1_1_boot_command.html#a5ed39355be6653d7665cb91ef24361e5">validateHeader()</a>. <br /></td></tr>
</td></tr>
<tr class="separator:a860e4a7f504f14254a28002418d78e2c inherit pro_types_classelftosb_1_1_encore_boot_image_1_1_boot_command"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Load data bootloader command. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a1841804636bd54dadc801149a93586ac"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EncoreBootImage::LoadCommand::LoadCommand </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default constructor. </p>
<p>All fields are set to zero. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a92f9fd7033d99f34803ce742c0eeab2a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t EncoreBootImage::LoadCommand::calculateCRC </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>A CRC-32 is calculated over the load data, including any pad bytes that are required in the last data cipher block. Including the pad bytes in the CRC makes it vastly easier for the ROM to calculate the CRC for validation. </p>

</div>
</div>
<a class="anchor" id="ac9a0c5e3c1a3643c6b5d16d51b507ab5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void EncoreBootImage::LoadCommand::fillCommandHeader </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classelftosb_1_1_encore_boot_image.html#structelftosb_1_1_encore_boot_image_1_1boot__command__t">boot_command_t</a> &amp;&#160;</td>
          <td class="paramname"><em>header</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructs the header for this boot command. </p>
<p>The only thing unique in the load command header is the <a class="el" href="classelftosb_1_1_encore_boot_image.html#aa48307f8a58d0d01b1fb7dbfbcc38ace" title="Additional data used by certain commands. ">elftosb::EncoreBootImage::boot_command_t::m_data</a>. It contains a CRC-32 over the load data, plus any bytes of padding in the last data cipher block. </p>

<p>Implements <a class="el" href="classelftosb_1_1_encore_boot_image_1_1_boot_command.html#a0fb0524a1f442d2666ae6d8cbb752237">elftosb::EncoreBootImage::BootCommand</a>.</p>

</div>
</div>
<a class="anchor" id="aea1eaeacc68bfd097e6cb674920a194b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void EncoreBootImage::LoadCommand::fillPadding </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Fills <a class="el" href="classelftosb_1_1_encore_boot_image_1_1_load_command.html#a43e6cc79a5e12d17ba9cd515633e73f3" title="Up to 15 pad bytes may be required. ">m_padding</a> with random bytes that may be used to fill up the last data cipher block. </p>

</div>
</div>
<a class="anchor" id="acb6824278d6bf8ca9bae7c6f80bc5a8c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned EncoreBootImage::LoadCommand::getDataBlockCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the number of data cipher blocks that follow this command. </p>
<dl class="section return"><dt>Returns</dt><dd>The number of cipher blocks required to hold the load data, rounded up as necessary. </dd></dl>

<p>Reimplemented from <a class="el" href="classelftosb_1_1_encore_boot_image_1_1_boot_command.html#a63457e77b2372a479df45aa9a1c205b0">elftosb::EncoreBootImage::BootCommand</a>.</p>

</div>
</div>
<a class="anchor" id="a5f8de3074ec88c92887a26c175ddfc6f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned EncoreBootImage::LoadCommand::getDataBlocks </td>
          <td>(</td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>maxCount</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cipher_block_t *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the contents of up to <em>maxCount</em> data blocks. </p>
<p>Up to <em>maxCount</em> data blocks are copied into the buffer pointed to by the <em>data</em> argument. This is only a request for <em>maxCount</em> blocks. A return value of 0 indicates that no more blocks are available. The index of the first block to copy is held in the <em>offset</em> argument. If there are pad bytes needed to fill out the last data block, they will be filled with random data in order to add to the "whiteness" of the data on both sides of encryption.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">offset</td><td>Starting block number to copy. Zero means the first available block. </td></tr>
    <tr><td class="paramname">maxCount</td><td>Up to this number of blocks may be copied into <em>data</em>. Must be 1 or greater. </td></tr>
    <tr><td class="paramname">data</td><td>Buffer for outgoing data blocks. Must have enough room to hold <em>maxCount</em> blocks.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of data blocks copied into <em>data</em>. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">0</td><td>No more blocks are available and nothing was written to <em>data</em>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::out_of_range</td><td>Thrown when offset is invalid.</td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented from <a class="el" href="classelftosb_1_1_encore_boot_image_1_1_boot_command.html#a46b3519a49537325f27f3ec556ed176d">elftosb::EncoreBootImage::BootCommand</a>.</p>

</div>
</div>
<a class="anchor" id="a203f5100b5104459a593b5146821af95"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void EncoreBootImage::LoadCommand::initFromData </td>
          <td>(</td>
          <td class="paramtype">const cipher_block_t *&#160;</td>
          <td class="paramname"><em>blocks</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned *&#160;</td>
          <td class="paramname"><em>consumed</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Read the command contents from raw data. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">blocks</td><td>Pointer to the raw data blocks. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">count</td><td>Number of blocks pointed to by <em>blocks</em>. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">consumed</td><td>On exit, this points to the number of cipher blocks that were occupied by the command. Should be at least 1 for every command. This must not be NULL on entry!</td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::runtime_error</td><td>This exception is thrown if the actual CRC of the load data does not match the CRC stored in the command header. Also thrown if the <em>count</em> parameter is less than the number of data blocks needed for the length specified in the command header or if header fields are invalid. </td></tr>
  </table>
  </dd>
</dl>

<p>Implements <a class="el" href="classelftosb_1_1_encore_boot_image_1_1_boot_command.html#ac7e73ff007dd5a179952b089930e684a">elftosb::EncoreBootImage::BootCommand</a>.</p>

</div>
</div>
<a class="anchor" id="aacf46c57a4f932a02b4ce0622ffee958"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void EncoreBootImage::LoadCommand::setData </td>
          <td>(</td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the data for the command to load. </p>
<p>A local copy of the load data is made. This copy will be disposed of when this object is destroyed. This means the caller is free to deallocate <em>data</em> after this call returns. It also means the caller can pass a pointer into the middle of a buffer for <em>data</em> and not worry about ownership issues. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="_encore_boot_image_8h_source.html">EncoreBootImage.h</a></li>
<li>EncoreBootImage.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>elftosb</b></li><li class="navelem"><a class="el" href="classelftosb_1_1_encore_boot_image.html">EncoreBootImage</a></li><li class="navelem"><a class="el" href="classelftosb_1_1_encore_boot_image_1_1_load_command.html">LoadCommand</a></li>
    <li class="footer">Generated on Mon Mar 7 2016 16:49:52 for Kinetis Bootloader Host by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
